#include "meter.h"
#include "meter_dragonball.h"
namespace igslib
{
	IMeterManager* CMeterManager::instance = 0;
	IMeterManager* CMeterManager::GetInstance() 
	{
		if ( instance == 0 )
		{
			instance = new CMeterManager();
		}
		return instance ;
	}
    IMeter* CMeterManager::NewMHMeter()
    {
        IMeter* rtn = nullptr;
        rtn = new CMeter();
        cpns.insert(rtn);
        return rtn;
    }
	IGPIOMeter* CMeterManager::New_ProjGPIOMeter(const std::string& name)
	{
		IGPIOMeter* rtn = nullptr;
		if(name=="DragonBallRace")
        {
			rtn = new meter_Grgn();
            cpns.insert(rtn);
        }else if(name=="DragonWarrior")
        {
			rtn = new meter_Grgn();
            cpns.insert(rtn);
        }
        return rtn;	
	}
}

extern "C"{
	igslib::IMeterManager* GetMeterManagerInstance()
	{
		return igslib::CMeterManager::GetInstance();
	}
}
